import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '产品表id',
    align:"center",
    dataIndex: 'materialId'
   },
   {
    title: '仓库id',
    align:"center",
    dataIndex: 'depotId'
   },
   {
    title: '序列号',
    align:"center",
    dataIndex: 'serialNumber'
   },
   {
    title: '是否卖出，0未卖出，1卖出',
    align:"center",
    dataIndex: 'isSell'
   },
   {
    title: '入库单价',
    align:"center",
    dataIndex: 'inPrice'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '创建人',
    align:"center",
    dataIndex: 'creator'
   },
   {
    title: '更新人',
    align:"center",
    dataIndex: 'updater'
   },
   {
    title: '入库单号',
    align:"center",
    dataIndex: 'inBillNo'
   },
   {
    title: '出库单号',
    align:"center",
    dataIndex: 'outBillNo'
   },
   {
    title: '租户id',
    align:"center",
    dataIndex: 'tenantId'
   },
   {
    title: '删除标记，0未删除，1删除',
    align:"center",
    dataIndex: 'deleteFlag'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '产品表id',
    field: 'materialId',
    component: 'InputNumber',
  },
  {
    label: '仓库id',
    field: 'depotId',
    component: 'InputNumber',
  },
  {
    label: '序列号',
    field: 'serialNumber',
    component: 'Input',
  },
  {
    label: '是否卖出，0未卖出，1卖出',
    field: 'isSell',
    component: 'Input',
  },
  {
    label: '入库单价',
    field: 'inPrice',
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '创建人',
    field: 'creator',
    component: 'InputNumber',
  },
  {
    label: '更新人',
    field: 'updater',
    component: 'InputNumber',
  },
  {
    label: '入库单号',
    field: 'inBillNo',
    component: 'Input',
  },
  {
    label: '出库单号',
    field: 'outBillNo',
    component: 'Input',
  },
  {
    label: '租户id',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '删除标记，0未删除，1删除',
    field: 'deleteFlag',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}